package opera;

import Book.BookList;
import Book.book;

import java.util.Scanner;

/**
 * @Author: shark爱吃辣椒
 * @Date: 2022-19-14:37
 * @Description:
 */
public class Find extends Finder implements IOpera{
    @Override
    public void work(BookList bookList) {
        System.out.println("查找图书");
        System.out.println("请输入要查找的图书名字：");
        boolean result = super.finderfun(bookList);
        if(result){
            System.out.println("图书已找到");
        }else{
            System.out.println("图书没有找到");
        }
       /* Scanner sca = new Scanner(System.in);
        String name = sca.nextLine();
        int bookslength  = bookList.getBooksnum();
        for (int i = 0; i < bookslength; i++) {
            book book = bookList.getbook(i);
            if(book.getName().equals(name)){
                System.out.println(book);
                System.out.println("图书已找到");
                return;
            }
        }

        System.out.println("图书没有找到");*/
    }
}
